//
//  YQLeftTableViewCell.m
//  NewRetail
//
//  Created by yuqin on 2019/6/24.
//  Copyright © 2019年 yuqin. All rights reserved.
//

#import "YQLeftTableViewCell.h"

@implementation YQLeftTableViewCell

- (void)setupTableViewCellView {
    self.backgroundColor = UIColorFromRGB(0xecedf2);
    [self addSubview:self.leftImg];
    [self addSubview:self.walletNameLab];
    [self addSubview:self.totalMoneyLab];
    
    [self.leftImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kMargin_left);
        make.top.mas_equalTo(kMargin_top);
        make.size.mas_equalTo(CGSizeMake(FIT(35), FIT(35)));
    }];
    
    [self.walletNameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftImg.mas_right).mas_equalTo(FIT(10));
        make.top.lessThanOrEqualTo(self.leftImg.mas_top);
    }];
    
    [self.totalMoneyLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftImg.mas_right).mas_equalTo(FIT(10));
        make.bottom.lessThanOrEqualTo(self.leftImg.mas_bottom);
    }];
    
}

- (UIImageView *)leftImg {
    if (!_leftImg) {
        _leftImg = [YQViewFactory imageViewWithImage:YQ_IMAGE(@"")];
        _leftImg.backgroundColor = MainRedTextColor;
        _leftImg.layer.cornerRadius = FIT(35)/2.0;
        _leftImg.layer.masksToBounds = YES;
    }
    return _leftImg;
}

- (UILabel *)walletNameLab {
    if (!_walletNameLab) {
        _walletNameLab = [YQViewFactory labelWithTextColor:MainBlackColor textAlignment:NSTextAlignmentLeft fontSize:kLittleFont userBold:NO];
        _walletNameLab.text = @"新钱包3";
    }
    return _walletNameLab;
}

- (UILabel *)totalMoneyLab {
    if (!_totalMoneyLab) {
        _totalMoneyLab = [YQViewFactory labelWithTextColor:MainBlackColor textAlignment:NSTextAlignmentLeft fontSize:kLittleFont userBold:NO];
        _totalMoneyLab.text = @"0.00000001 WDC";
    }
    return _totalMoneyLab;
}

@end
